package org.strieber.fca;

import java.io.File;

public class QuickRT {
	static String inputFileNameALL = "resultsALL.txt";
	static String inputFileNameSOD = "resultsSOD.txt";
	static String inputFileNameCRT = "resultsCRT.txt";
	static String inputFileNameGPX = "resultsGPX.txt";
	static String inputFileNameCAT = "resultsCAT.txt";
	static String inputFileNameMDA = "resultsMDA.txt";

	static String saveFileNameALLSOD = "trimmedALL-SOD.txt";
	static String saveFileNameALLCRT = "trimmedALL-CRT.txt";
	static String saveFileNameALLGPX = "trimmedALL-GPX.txt";
	static String saveFileNameALLCAT = "trimmedALL-CAT.txt";
	static String saveFileNameALLMDA = "trimmedALL-MDA.txt";
	static String saveFileNameSOD = "trimmedSOD.txt";
	static String saveFileNameCRT = "trimmedCRT.txt";
	static String saveFileNameGPX = "trimmedGPX.txt";
	static String saveFileNameCAT = "trimmedCAT.txt";
	static String saveFileNameMDA = "trimmedMDA.txt";

	public static void main(String[] args) throws Exception {

		File inputFileALL = new File(inputFileNameALL); 
		File inputFileSOD = new File(inputFileNameSOD);
		File inputFileCRT = new File(inputFileNameCRT);
		File inputFileGPX = new File(inputFileNameGPX);
		File inputFileCAT = new File(inputFileNameCAT);
		File inputFileMDA = new File(inputFileNameMDA);

		File saveFileALLSOD = new File(saveFileNameALLSOD); 
		File saveFileALLCRT = new File(saveFileNameALLCRT);
		File saveFileALLGPX = new File(saveFileNameALLGPX);
		File saveFileALLCAT = new File(saveFileNameALLCAT);
		File saveFileALLMDA = new File(saveFileNameALLMDA);
		File saveFileSOD = new File(saveFileNameSOD);
		File saveFileCRT = new File(saveFileNameCRT);
		File saveFileGPX = new File(saveFileNameGPX);
		File saveFileCAT = new File(saveFileNameCAT);
		File saveFileMDA = new File(saveFileNameMDA);

		ResultsTrimmer rtALLSOD = new ResultsTrimmer(inputFileALL);
		ResultsTrimmer rtALLCRT = new ResultsTrimmer(inputFileALL);
		ResultsTrimmer rtALLGPX = new ResultsTrimmer(inputFileALL);
		ResultsTrimmer rtALLCAT = new ResultsTrimmer(inputFileALL);
		ResultsTrimmer rtALLMDA = new ResultsTrimmer(inputFileALL);
		ResultsTrimmer rtSOD = new ResultsTrimmer(inputFileSOD);
		ResultsTrimmer rtCRT = new ResultsTrimmer(inputFileCRT);
		ResultsTrimmer rtGPX = new ResultsTrimmer(inputFileGPX);
		ResultsTrimmer rtCAT = new ResultsTrimmer(inputFileCAT);
		ResultsTrimmer rtMDA = new ResultsTrimmer(inputFileMDA);
		
		rtALLSOD.pruneByMinSupport(10);
		rtALLSOD.pruneByMinConfidence(75);
		rtALLSOD.pruneByRequiredIntent("SOD");
		rtALLSOD.exportRules(saveFileALLSOD);
		
		rtSOD.pruneByMinSupport(10);
		rtSOD.pruneByMinConfidence(75);
		rtSOD.pruneByRequiredIntent("SOD");
		rtSOD.exportRules(saveFileSOD);
		
		rtALLCRT.pruneByMinSupport(10);
		rtALLCRT.pruneByMinConfidence(75);
		rtALLCRT.pruneByRequiredIntent("CRT");
		rtALLCRT.exportRules(saveFileALLCRT);
		
		rtCRT.pruneByMinSupport(10);
		rtCRT.pruneByMinConfidence(75);
		rtCRT.pruneByRequiredIntent("CRT");
		rtCRT.exportRules(saveFileCRT);
		
		rtALLGPX.pruneByMinSupport(10);
		rtALLGPX.pruneByMinConfidence(75);
		rtALLGPX.pruneByRequiredIntent("GPX");
		rtALLGPX.exportRules(saveFileALLGPX);
		
		rtGPX.pruneByMinSupport(10);
		rtGPX.pruneByMinConfidence(75);
		rtGPX.pruneByRequiredIntent("GPX");
		rtGPX.exportRules(saveFileGPX);
		
		rtALLCAT.pruneByMinSupport(10);
		rtALLCAT.pruneByMinConfidence(75);
		rtALLCAT.pruneByRequiredIntent("CAT");
		rtALLCAT.exportRules(saveFileALLCAT);
		
		rtCAT.pruneByMinSupport(10);
		rtCAT.pruneByMinConfidence(75);
		rtCAT.pruneByRequiredIntent("CAT");
		rtCAT.exportRules(saveFileCAT);
		
		rtALLMDA.pruneByMinSupport(10);
		rtALLMDA.pruneByMinConfidence(75);
		rtALLMDA.pruneByRequiredIntent("MDA");
		rtALLMDA.exportRules(saveFileALLMDA);
		
		rtMDA.pruneByMinSupport(10);
		rtMDA.pruneByMinConfidence(75);
		rtMDA.pruneByRequiredIntent("MDA");
		rtMDA.exportRules(saveFileMDA);
	}
}
